package com.qf.oop.dt;

/**
 * 定义一个方法，这个方法可以产生圆形或者矩形，传入参数 (0，1)
 */
public class Graphical {
    public static void main(String[] args) {
        createGraphical(0);
        createGraphical(1);
    }

    public static void createGraphical(int number) {
        if (number == 0) {
            System.out.println("打印一个圆");
            createRound();
        } else if (number == 1) {
            System.out.println("打印一个矩形");
            createRectangle();
        }
    }

    public static void createRound() {
        Round round = new Round();
        round.printInfo();
    }

    public static void createRectangle() {
        Rectangle rectangle = new Rectangle();
        rectangle.printInfo();
    }

}


